package org.testis.gui.mvc.utilities;

import org.testis.gui.mvc.controller.TestDesignControllerList;
import java.io.PrintStream;


/**
 *
 * @author nurhat
 */
public class SystemOutReader extends PrintStream
{

    public SystemOutReader()
    {
        super(System.out,
              true);
    }


    @Override
    public void print(boolean b)
    {
        super.print(b);
    }


    @Override
    public void print(Object obj)
    {
        TestDesignControllerList.newInstance().
            getRunningTestSuiteController().operationChangeOutput(obj.toString());
        DebugLogger.getInstance().print(obj);
    }


    @Override
    public void print(String s)
    {
        TestDesignControllerList.newInstance().
            getRunningTestSuiteController().operationChangeOutput(s);
        DebugLogger.getInstance().print(s);
    }


    @Override
    public void println(String s)
    {
        TestDesignControllerList.newInstance().
            getRunningTestSuiteController().operationChangeOutput(s);
        DebugLogger.getInstance().print(s);
    }


    @Override
    public void println(Object obj)
    {
        TestDesignControllerList.newInstance().
            getRunningTestSuiteController().operationChangeOutput(obj.toString());
        DebugLogger.getInstance().print(obj);
    }
}
